﻿@using System.Web.Mvc.Html
@model IQueryable<Promike.site.Models.Post>
@{
    ViewBag.Title = "Все обзоры";
}
<style type="text/css">
    .content-wrapper {
        margin: 0 auto;
        max-width: 960px;
    }
</style>
<br />
@foreach (var item in Model)
{
    <div class="content">
        <h2>
            <a href="/Post/Details/@item.ID">@item.Title</a>
        </h2>
        
        <h4>@String.Format("{0:g}", item.PublishDate.ToShortDateString()), Автор: @item.Author, 
            Рейтинг: 
            @for (int k = 0; k < @item.Rating; k++)
            {
                <img class="image_rate" src="~/Content/images/star.png" alt=""/>
            }
        </h4>
        <div class="photo image_logo" data-title="@item.MiniContent">
            <a href="/Post/Details/@item.ID">
                <img class="image_logo" src="@Url.Content("/Content/images/logos/" + @item.ID + "logo.jpg")" title="@item.MiniContent"/>
            </a>
        </div>

        @{
            if (item.DownloadFileName != null)
            {
            <p class="download">@Html.ActionLink("Скачать", "Download", new { fileName = item.DownloadFileName }, new { @class = "download-file", title = "Скачать торрент файл-" + item.DownloadFileName })</p>     
            }
        }
        <p>
            <a href="/Post/Details/@item.ID">Читать далее →</a>
        </p>
    </div>
    <br />
                
}
@Scripts.Render("~/bundles/vk_up_back")
@Scripts.Render("~/bundles/social-buttons")


